July 2000 Third Workshop on Attribute Grammars and Their Applications Waga2000 Attribute Grammars as Record Calculus a Structure-oriented Denotational Semantics of Attribute Grammars by Using Cardelli's Record Calculus
نویسنده
چکیده
In this paper, we present a new denotational semantics of attribute grammars (AGs) by using Cardelli's record calculus. This new denotational semantics is simple, natural and structure-oriented. AGs have been considered useful in describing interactive programming environments as well as in specifying the semantics of programming languages. Using AGs, interactive programming environments are often described as attributed trees with several AG extensions, e.g., higher-order features, subtree replacement, and remote access. Unfortunately, it was not easy to compare various deenitions for these extensions in a formal way. One of the reasons is that previous studies for AG semantics are not structure-oriented, that is, they are based on attribute valuation, not an attributed tree itself. For example, AG semantics based on attribute valuation can not deal directly with program transformation such as a (b + c)) a b + a c. In our new semantics, an attributed tree is represented as a nested record to preserve the structural information of the attributed tree. This enables us to deal directly with attributed trees rather than attribute valuation as AG semantics. We also represent higher-order AGs, recursive AGs and OOAG as record calculus by extending the semantics to show that our semantics can formalize such AG extensions. Both of higher-order AGs and OOAG are computational models to deal with tree transformation depending on attribute values.
منابع مشابه
July 2000 Third Workshop on Attribute Grammars and Their Applications Waga2000 Testing Attribute Grammars
Fundamental notions for testing attribute grammars are developed. Two dimensions are explored. The structural dimension focuses on the context-free grammar part of an attribute grammar, whereas the semantic dimension is concerned with attributes, attribute types, conditions, and computations. In both dimensions, and also for the combination of them, we are interested in coverage notions, test s...
متن کاملThe Template and Multiple Inheritance Approach into Attribute Grammars
Formal methods for describing programming language semantics, such as attribute grammars, operational semantics and denotational semantics, are not widely used since they are not modular, extensible and reusable. In the paper a new modular, extensible and reusable approach for specifying programming languages with attribute grammars is presented. The concepts from object-oriented programming, i...
متن کاملFormalising and Verifying Reference Attribute Grammars in Coq
Reference attribute grammars are a powerful formalism for concisely specifying and implementing static analyses. While they have proven their merit in practical applications, no attempt has so far been made to rigorously verify correctness properties of the resulting systems. We present a general method for formalising reference attribute grammars in the theorem prover Coq. The formalisation is...
متن کاملJuly 2000 Third Workshop on Attribute Grammars and their Applications WAGA 2000 Advances in Attribute Grammar Driven HardwareCompilation
High-level or behavioral synthesis of digital circuits ooers an eeective way to deal with the increasing complexity of digital hardware design. A high-level synthesis tool transforms an abstract algorithmic description into a detailed register transfer level implementation. Since most of the times the algorithmic description is given in textual form, high-level synthesis transformations share c...
متن کاملObject - Oriented Attribute Grammars
This paper introduces object-oriented attribute grammars. These can be characterized as a notation for all classes of attribute grammars. Based on a subtype relation between grammar rules, inheritance of attributes and attribute computations are defined. With this approach, attributes local to grammar rules and the elimination of chain rules are possible without any special constructs. We prese...
متن کامل